﻿Imports BUS
Imports DTO
Public Class FormXoaBan
    Public _flag As Integer = 0
    Dim _banBUS As New BanBUS()
    Dim _listBan As New List(Of BanDTO)
    Private Sub FormXoaBan_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadMaBan()
    End Sub

    Public Sub LoadMaBan()
        _listBan = _banBUS.LayDanhSachBanBUS()
        For Each _banDTO As BanDTO In _listBan
            cbMaBan.Items.Add(_banDTO.MaBan)

        Next
    End Sub

    Private Sub btnHuy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHuy.Click
        Me.Close()
    End Sub

    Private Sub btnXoa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnXoa.Click
        If (cbMaBan.SelectedIndex = -1) Then
            MessageBox.Show("Chọn mã bàn")
            Return
        End If
        _flag = 1
        Me.Close()
    End Sub
End Class